﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>

    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/redmond/jquery-ui-1.8.13.custom.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.13.custom.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/menu/script.js")" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/menu/menu.css")" rel="stylesheet" type="text/css" />
    
</head>

<body>
<table width="95%" cellpadding="0" cellspacing="0" border="0" class="mainTable">
    <tr><td class="headerText" align="right">Site Content Administration&nbsp;</td></tr>
    <tr>
        <td valign="top" align="left">
    
    @Html.Partial("Progress")
    @Html.Partial("UserDialogs")

    @if (ViewBag.ErrorMessage != null && ViewBag.ErrorMessage.Length > 0)
    {
        <script language="javascript" type="text/javascript">
            showOKDialog('@ViewBag.ErrorMessage');
        </script>
    }
    
    <div align="right">
        @if(Request.IsAuthenticated) {
            <text>Welcome <strong>@User.Identity.Name</strong>!
            [ @Html.ActionLink("Log Off", "LogOff", "Account") ]&nbsp;</text>
        }
    </div><br />
    <table width="95%" cellpadding="0" cellspacing="0" border="0" class="contentTable">
    
    <tr>
        <td valign="top" align="left">
    @{ 
        var url = Request.Url.AbsolutePath.ToLower();
        var selectedSet = false;
    }
    
    @if (!url.Contains("/account/"))
    {
        <div id="menu-container">

        <ul id="navigationMenu" class="menuUL">

          

            @if (url.Contains("image") || url.ToLower() == "/admin")
            {
                <li><a href="#" class="selectedMenu" onclick="window.location.href='@Url.Action("Index", "ImageAdmin")';return false;">images</a></li>
                selectedSet = true;
            }
            else
            {
                <li><a href="#" class="normalMenu" onclick="window.location.href='@Url.Action("Index", "ImageAdmin")';return false;">images</a></li>
            }

            @if (!selectedSet && url.Contains("page"))
            {
                <li><a href="#" class="selectedMenu" onclick="window.location.href='@Url.Action("Index", "PageAdmin")';return false;">pages</a></li>
                selectedSet = true;
            }
            else
            {
                <li><a href="#" class="normalMenu" onclick="window.location.href='@Url.Action("Index", "PageAdmin")';return false;">pages</a></li>
            }

            @if (!selectedSet && url.Contains("product"))
            {
                <li><a href="#" class="selectedMenu" onclick="window.location.href='@Url.Action("Index", "ProductAdmin")';return false;">products</a></li>
                selectedSet = true;
            }
            else
            {
                <li><a href="#" class="normalMenu" onclick="window.location.href='@Url.Action("Index", "ProductAdmin")';return false;">products</a></li>
            }

            @if (!selectedSet && url.Contains("category"))
            {
               <li><a href="#" class="selectedMenu" onclick="window.location.href='@Url.Action("Index", "CategoryAdmin")';return false;">categories</a></li>
                selectedSet = true;
            }
            else
            {
                <li><a href="#" class="normalMenu" onclick="window.location.href='@Url.Action("Index", "CategoryAdmin")';return false;">categories</a></li>
            }
            
        </ul>
    </div>
    }
    
    @RenderBody()
    <br />
    </td>
    </tr>
    </table>
    </td>
    </tr>
</table>
</body>

</html>
